#ifndef __DRV_FB_H__
#define __DRV_FB_H__
#include <stdint.h>

/**
 * @brief 图锟斤拷锟绞?
 *
 */
typedef enum
{
  VRAM_FORMAT_ARGB = 0,
  VRAM_FORMAT_RGB565,
  VRAM_FORMAT_RGB888,
} VRAM_FORMAT;

/**
 * @brief 硬锟斤拷图锟斤拷锟斤拷锟斤拷锟斤拷息
 *
 */
struct lcd_layer_t
{
  uint8_t enable;
  uint8_t num;
  uint32_t width;
  uint32_t height;
  uint32_t posx;
  uint32_t posy;
  uint32_t priority;
  uint32_t pipe;
  uint32_t alpha_value;
  uint32_t alpha_enable;
  uint32_t vram_format;
  void * vram;
};

/**
 * @brief 液晶屏时序
 *
 */
struct lcd_timing {
    rt_uint32_t pixel_clock_hz;
    rt_uint32_t h_front_porch;
    rt_uint32_t h_back_porch;
    rt_uint32_t h_sync_len;
    rt_uint32_t v_front_porch;
    rt_uint32_t v_back_porch;
    rt_uint32_t v_sync_len;
    rt_uint32_t h_sync_active;
    rt_uint32_t v_sync_active;
    rt_uint32_t den_active;
    rt_uint32_t clk_active;
};

int rt_hw_lcd_init(void);
#endif
